package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;
import java.util.concurrent.TimeUnit;

@Service
public class HelloServiceImpl implements HelloService {

    private Random random = new Random();

    @Override
    public String methodA() {
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodA 调用成功！";
    }

    @Override
    public String methodB() {
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodB 调用成功！";
    }

    @Override
    public String methodC() {
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodC 调用成功！";
    }
}
